export function getTimeFormat(value) {
  var b = new Date(value);
  var year = b.getFullYear() + "-";
  var month = b.getMonth() + 1;
  var date = b.getDate();
  var hour = b.getHours();
  var min = b.getMinutes();
  var second = b.getSeconds();
  if (month < 10) {
    month = "0" + (b.getMonth() + 1) + "-";
  } else {
    month = b.getMonth() + 1 + "-";
  }
  if (date < 10) {
    date = "0" + b.getDate();
  }
  if (hour < 10) {
    hour = "0" + b.getHours() + ":";
  } else {
    hour = b.getHours() + ":";
  }
  if (min < 10) {
    min = "0" + b.getMinutes() + ":";
  } else {
    min = b.getMinutes() + ":";
  }
  if (second < 10) {
    second = "0" + b.getSeconds();
  }
  var str =
    String(year) +
    String(month) +
    String(date) +
    " " +
    String(hour) +
    String(min) +
    String(second);
  return str;
}
export function getTimeFor(value) {
  var b = new Date(value);
  var year = b.getFullYear() + "-";
  var month = b.getMonth() + 1;
  var date = b.getDate();
  if (month < 10) {
    month = "0" + (b.getMonth() + 1) + "-";
  } else {
    month = b.getMonth() + 1 + "-";
  }
  if (date < 10) {
    date = "0" + b.getDate();
  }
  var str = String(year) + String(month) + String(date);
  return str;
}
